import React from 'react';

import { Grid, List, Table, Column, Icon } from 'react-virtualized';

import './index.scss';


// Table data as an array of objects
const list2 = [
    { name: 'admin', description: 'Software engineer' }
];

for (var i = 0; i < 1000; i++) {
    list2.push({ name: '王孟贵' + i, description: 'Software engineer' })
}


function rowRenderer({
    key,         // Unique key within array of rows
    index,       // Index of row within collection
    isScrolling, // The List is currently being scrolled
    isVisible,   // This row is visible within the List (eg it is not an overscanned row)
    style        // Style object to be applied to row (to position it)
}) {
    return (
        <div
            className="right_user_each"
            key={key}
            style={style}
        >
            {list2[index].name}
        </div>
    )
}



class ListView extends React.Component {

    constructor(props) {
        super(props);
        this.state = {
            userList: []
        };
    }


    render() {
        return (
            <div className="page_view_container meeting-create-page">
                <div className="page-main-container ">


                    <div className="main"> </div>
                    <div className="right_side">
                        <List
                            width={300}
                            height={300}
                            rowCount={list2.length}
                            rowHeight={40}
                            rowRenderer={rowRenderer}
                        />
                    </div>





                </div>
            </div>
        );
    }
}
export default ListView;